import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';

@Component({
  selector: 'app-radio',
  templateUrl: './radio.page.html',
  styleUrls: ['./radio.page.scss'],
})
export class RadioPage implements OnInit {

  like: string = "篮球"

  constructor(private router: Router) { }

  ngOnInit() {
  }

  gotohome(){
    this.router.navigate(['/tabs/tab2'])
  }

  selectevent(num){
    var num = num;
    console.log(num);
    switch (num) {
       case 1:
         this.like = "篮球"
         break;
       case 2:
         this.like = "足球"
         break;
       case 3:
         this.like = "羽毛球"
         break;  
    }
  }

}
